//
//  AnimationData.m
//  项目二
//
//  Created by rimi1 on 2016/11/17.
//  Copyright © 2016年 Wangxingqian. All rights reserved.
//

#import "AnimationData.h"

@implementation AnimationData

- (instancetype)init {
    self = [super init];
    if (self) {
        _width = [UIScreen mainScreen].bounds.size.width;
        _height = [UIScreen mainScreen].bounds.size.height;
        _AWidth = 150;
        _AHeight = 100;
        _radius = self.AHeight/2 - 20;
        _arcDuration = 0.8;
        _viewDuration = 0.2;
    }
    return self;
}

// 根据文字计算宽度
+ (CGFloat)widthWithText:(NSString *)text {
    CGRect rect = [text boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, 17) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:17]} context:nil];
    
    return rect.size.width;
}

@end












